package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.ShopCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ShopCartMapper {
    int deleteByPrimaryKey(Integer cartId);

    int insert(ShopCart record);

    int insertSelective(ShopCart record);

    ShopCart selectByPrimaryKey(Integer cartId);

    int updateByPrimaryKeySelective(ShopCart record);

    int updateByPrimaryKey(ShopCart record);

    //购物车商品
    List<Map<String,Object>> shopCartList(String customerId);

    //删除购物车商品
    int deleteShopCartById(Integer id);

    //删除
    int deleteById(@Param("customerId") String customerId, @Param("goodsId") String goodsId);

    int vertifiData(@Param("customerId") String customerId, @Param("goodsId") String goodsId);

    //通过customerId 和 goodsId 搜寻购物车对象
    ShopCart selectByCustomerIdAndGoodsId(@Param("customerId") String customerId, @Param("goodsId") String goodsId);
}